/**
 * 两位 小数千分位
 */

const toThousands = (number) => {
  if (typeof number !== 'number') return ''
  let formattedNumber = number.toFixed(2)
  formattedNumber = formattedNumber.replace(/\d(?=(\d{3})+\.)/g, '$&,')
  return formattedNumber
}
export default toThousands
